package com.zjsystem.zjsy.controller;

import com.zjsystem.zjsy.result.Result;
import com.zjsystem.zjsy.service.ZjActionService;
import com.zjsystem.zjsy.vo.ActionMonitorVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: 王云飞
 * @name: ActiuonMonitoringController
 * @Date: 2024/7/9 9:58
 * 行动监控入口
 */
@Slf4j
@Api("行动监控")
@RestController
@RequestMapping("/zjsy/actionMon")
public class ActionMonitoringController {
    @Resource
    private ZjActionService actionService;

    @ApiOperation("行动监控视图")
    @GetMapping("/listView")
    public Result listView(@RequestParam("rwId") String rwId) {
        try {
            ActionMonitorVO vo = actionService.listView(rwId);
            return Result.ok(vo);
        } catch (Exception e) {
            return Result.fail().message(e.getMessage());
        }
    }

}
